home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.2 Development Libraries / SGI IRIX 6.2 Development Libraries.iso / dist / gl_dev.idb / usr / share / src / OpenGL / toolkits / libwidget / Makefile.z / Makefile
Encoding:
Makefile  |  1996-03-15  |  2.0 KB  |  98 lines

  1. #!smake
  2.  
  3. GLSTYLE ?= ALL
  4.  
  5. COMMONPREF = standard
  6. include $(ROOT)/usr/include/make/commondefs
  7. sinclude $(ROOT)/usr/include/make/$(PRODUCT)defs
  8.  
  9. #if defined(RELEASE_MAJOR) && $(RELEASE_MAJOR) == "6"
  10. STYLES = 32 N32 64
  11. TARGETS = libGLw.32 libGLw.N32 libGLw.64
  12. #else
  13. STYLES = 32
  14. TARGETS = libGLw.32
  15. #endif
  16.  
  17. GLDEBUG ?= no
  18. #if $(GLDEBUG) != "no"
  19. WOFF =
  20. OPTIMIZER = -g
  21. #endif
  22.  
  23. TOOLKITDIR ?= /usr/share/src/OpenGL/toolkits
  24.  
  25. LCINCS = -I$(ROOT)$(TOOLKITDIR)/include
  26.  
  27. DFILES = \
  28.     README \
  29.     $(NULL)
  30.  
  31. HFILES = \
  32.     GLwDrawA.h \
  33.     GLwDrawAP.h \
  34.     GLwMDrawA.h \
  35.     GLwMDrawAP.h \
  36.     $(NULL)
  37.  
  38. CFILES = \
  39.     GLwDrawA.c \
  40.     GLwMDrawA.c \
  41.     GLwDAUtil.c \
  42.     $(NULL)
  43.  
  44. default: $(_FORCE)
  45.     @if [ "$(GLSTYLE)" = "ALL" ]; then \
  46.         ALLSTYLES="$(STYLES)"; \
  47.     else \
  48.         ALLSTYLES="$(GLSTYLE)"; \
  49.     fi; \
  50.     for STYLE in $$ALLSTYLES; do \
  51.         OBJECT_STYLE=$$STYLE $(MAKE) library; \
  52.     done;
  53.  
  54. include $(COMMONRULES)
  55.  
  56. library:
  57.     @if [ ! -d libGLw.$(OBJECT_STYLE) ]; then \
  58.         mkdir libGLw.$(OBJECT_STYLE); \
  59.     fi; \
  60.     cd libGLw.$(OBJECT_STYLE); OBJECT_STYLE=$(OBJECT_STYLE) $(MAKE) -f ../Makefile links;
  61.     cd libGLw.$(OBJECT_STYLE); OBJECT_STYLE=$(OBJECT_STYLE) $(MAKE) -f ../Makefile libGLw.a;
  62.  
  63. links:
  64.     @for i in $(HFILES) $(CFILES); do \
  65.         if [ ! -r $$i ]; then \
  66.         ln -s ../$$i $$i; \
  67.         fi; \
  68.     done;
  69.  
  70. libGLw.a: $(OBJECTS)
  71.     $(AR) crl $@ $(OBJECTS);
  72.  
  73. clean: $(COMMONPREF)$$@
  74.     for i in $(TARGETS); do \
  75.         if [ -d $$i ]; then \
  76.         ( cd $$i; $(MAKE) $(COMMONPREF)clean ); \
  77.         fi; \
  78.     done;
  79.  
  80. clobber: $(COMMONPREF)$$@
  81.     for i in $(TARGETS); do \
  82.         if [ -d $$i ]; then \
  83.         rm -rf $$i; \
  84.         fi; \
  85.     done;
  86.  
  87. headers:
  88.     $(INSTALL) -F $(TOOLKITDIR)/include/GL -idb "LIBWIDGET" $(HFILES);
  89.  
  90. install: headers default
  91.     $(INSTALL) -F $(TOOLKITDIR)/lib -idb "LIBWIDGET" -src libGLw.32/libGLw.a -O libGLw.a;
  92. #if defined(RELEASE_MAJOR) && $(RELEASE_MAJOR) == "6"
  93.     $(INSTALL) -F $(TOOLKITDIR)/lib32 -idb "LIBWIDGET" -src libGLw.N32/libGLw.a -O libGLw.a;
  94.     $(INSTALL) -F $(TOOLKITDIR)/lib64 -idb "LIBWIDGET" -src libGLw.64/libGLw.a -O libGLw.a;
  95. #endif
  96.  
  97. $(COMMONTARGS): $(COMMONPREF)$$@
  98.